<?php session_start(); ?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Keywords" content="articulos, promocionales, diseño, creativo, publicidad, merida, yucatan, mexico, servicio, atento, cordial, publicitarios, promociones, anuncios">
<meta name="Description" content="+52(999)9483016 C. 1-H No. 133 local 6 x 14 C.P. 97125 Col. Residencial México Norte, Mérida, Yucatán. Artículos promocionales, diseño gráfico y publicidad. Un servicio integral al alcance de tu empresa.">
<meta http-equiv="Window-target" content="_blank" >
<meta name="Robots" content="all">
<title>PLASMA © Promotional Design | Login</title>


<link href='css/style.css' rel='stylesheet' type='text/css' />
<link href='css/skin.css' rel='stylesheet' type='text/css' />
<link href="css/jquery.qtip.css" rel="stylesheet" type="text/css" />

<script type='text/javascript' src='js/jquery.jcarousel.js'></script>
<script type='text/javascript' src='js/cufon-yui.js'></script>
<script type='text/javascript' src='css/VistaSan_500-VistaSan_700.font.js'></script>


<script type='text/javascript' src='js/jquery.qtip.pack.js'></script>
<script language="javascript" type="text/javascript" src="js/jquery.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.easing.js"></script>
<script language="javascript" type="text/javascript" src="js/script.js"></script>
<script> 
function evalue(){
	var x= document.getElementById("log");
	var nombre=document.getElementById("user").value;
	var password=document.getElementById("pass").value;
			if(esVacio(nombre)){
				alert('Falta nombre');
				x.user.focus();
				return false;
			}
			else if(esVacio(password)){
				alert('Falta contraseña');
				x.pass.focus();
				return false;}
			else{return true;}
}
function esVacio(x){
	var filter=/^\s*$/;
	return filter.test(x);
}
	
function cargarPagina(){
    parent.location="forget.php?user="+document.getElementById("user").value;
}

</script>

</head>
<body bgcolor="#d1d3d4" onSelectStart="return false" >

     <?php
     if ((isset($_SESSION['user'])&&isset($_SESSION['cod']))) {	
                    echo '<SCRIPT LANGUAGE="javascript">location.href = "inicioAdmin.php";</SCRIPT>';
            }else{
                $mens=$_GET["mens"];
                if($mens!=""){echo '<SCRIPT LANGUAGE="javascript">alert("'.$mens.'");</SCRIPT>';}
     ?>
<center>
    <div align="center" class="contenido_inicio" >
            <form id="log" method="post" onsubmit="return evalue()" action="logvalidacion.php"  >
             <div class="logcontenido">
                 <br></br>
                     <table class="logtabla">
                            <tr><td><label>Usuario</label></td><td><input type="text" id="user" name="user" maxlength="15"></td></tr>
                            <tr><td><label>Contrase&ntilde;a</label></td><td><input type="password" id="pass" name="pass" maxlength="15"></td></tr>
                     </table>
                     <p>
                    <input name="enviar" id="enviar" type="submit" class="small awesome gray" value="Entrar" /><p>
               </div>
           </form>
        <?php }?>
</div>
</center>
</body>
<script type="text/javascript">
$(document).ready(function() {
	Cat = $(this);
	var $el, leftPos, newWidth, $mainNav = $("#men");

    $mainNav.append("<li id='magic-line'></li>");
    
    var $magicLine = $("#magic-line");
    
    $magicLine
        .width($(".current_page_item").width())
        .css("left", $(".current_page_item a").position().left+66)
        .data("origLeft", $magicLine.position().left)
        .data("origWidth", $magicLine.width());
        
    $("#men li").find("a").hover(function() {
        $el = $(this);
		leftPos=$el.position().left+(($el.parent().width()-34)/2);
        newWidth = $el.parent().width();
        $magicLine.stop().animate({
            left: leftPos,
            width: newWidth
        });
		$(".current_page_item").removeClass('current_page_item');
		$el.parent().addClass('current_page_item');
		Cufon.refresh();
    }, function() {
        $magicLine.stop().animate({
            left: $magicLine.data("origLeft"),
            width: $magicLine.data("origWidth")
        });    
    });
	
	$('#mycarousel').jcarousel({ vertical: true	});
	
	$('#submenu li a').click(function(){
		Cat = $(this).attr('alt');
		$('.jcarousel-skin-tango').remove();
		$('.scrollable_vertical').append("<ul id='mycarousel' class='jcarousel-skin-tango'> </ul>");
		$('#mycarousel').jcarousel({
			vertical: true,
			scroll: 5,
			visible: 5,
			initCallback: mycarousel_initCallback
		});
		return false;
	});
});

function binDClick() {
	$('.jcarousel-skin-tango a').click(function(){
		var Prod = $(this).attr('href');
		$('.info_scrollable').fadeOut('fast',function() {
    		$('.info_scrollable').load(Prod, function(response, status, xhr) {
  				if (status == "success") {
					$('.info_scrollable').fadeIn('slow');
					/*$('.info2 img').each(function(i){
						var title=$(this).attr('title');
						$(this).tooltip({ offset: [10, 2], effect: 'slide' });
					});*/
					//$('.info2 img[title]').tooltip({ offset: [10, 2], effect: 'slide' });
					$('img[title]').qtip({
							position: {
								my: 'bottom center',  //donde esta la flecha del tooltip
								at: 'top center' // a donde apunta el tooltip
								 // my target
							},
							style: {
								classes: 'ui-tooltip-dark'
							}
					});
				}
			});
		});
		return false;
	});
}
function mycarousel_initCallback(carousel, state){
    jQuery.get('listas.php', {'funcion': '1', 'cat': Cat, first: carousel.first, last: carousel.last, newest: new Date().getTime() }, function(xml) { 
		mycarousel_itemAddCallback(carousel, carousel.first, carousel.last, xml); 
	}, 'xml' );
};
function mycarousel_itemAddCallback(carousel, first, last, xml){
    // Set the size of the carousel
    carousel.size(parseInt(jQuery('total', xml).text()));
    jQuery('image', xml).each(function(i) {
        carousel.add(first + i, mycarousel_getItemHTML(jQuery(this).find('scr').text(),jQuery(this).find('prod').text()));
    });
	binDClick()
	carousel.setup();
};
function mycarousel_getItemHTML(url,prod){
    return '<a href="listas.php?funcion=2&id_prod='+ prod +'"><img src="imagenes/promocionales/thumb1/' + url + '" width="142" height="96" /></a>';
	//return '<img src="imagenes/promocionales/thumb/' + url + '" width="142" height="96" />';
};
</script>
</html>
